.class public Lcom/htc/android/footprints/overlay/AbstractGroupableOverlay$GroupMapItem;
.super Ljava/lang/Object;
.source "AbstractGroupableOverlay.java"


# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
    value = Lcom/htc/android/footprints/overlay/AbstractGroupableOverlay;
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x4
    name = "GroupMapItem"
.end annotation


# instance fields
.field mItemList:Ljava/util/ArrayList;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/ArrayList",
            "<",
            "Lcom/htc/android/footprints/vo/Footprint;",
            ">;"
        }
    .end annotation
.end field

.field mMarker:Landroid/graphics/drawable/Drawable;

.field mPoint:Lcom/google/android/maps/GeoPoint;

.field final synthetic this$0:Lcom/htc/android/footprints/overlay/AbstractGroupableOverlay;


# direct methods
.method constructor <init>(Lcom/htc/android/footprints/overlay/AbstractGroupableOverlay;)V
    .locals 2
    .parameter

    .prologue
    .line 317
    iput-object p1, p0, Lcom/htc/android/footprints/overlay/AbstractGroupableOverlay$GroupMapItem;->this$0:Lcom/htc/android/footprints/overlay/AbstractGroupableOverlay;

    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    .line 318
    new-instance v0, Ljava/util/ArrayList;

    const/4 v1, 0x1

    invoke-direct {v0, v1}, Ljava/util/ArrayList;-><init>(I)V

    iput-object v0, p0, Lcom/htc/android/footprints/overlay/AbstractGroupableOverlay$GroupMapItem;->mItemList:Ljava/util/ArrayList;

    .line 319
    return-void
.end method


# virtual methods
.method public addMapItem(Lcom/htc/android/footprints/vo/Footprint;)V
    .locals 8
    .parameter "item"

    .prologue
    .line 322
    iget-object v5, p0, Lcom/htc/android/footprints/overlay/AbstractGroupableOverlay$GroupMapItem;->mItemList:Ljava/util/ArrayList;

    invoke-virtual {v5, p1}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z

    .line 323
    const/4 v1, 0x0

    .line 324
    .local v1, latTotal:I
    const/4 v2, 0x0

    .line 325
    .local v2, lonTotal:I
    iget-object v5, p0, Lcom/htc/android/footprints/overlay/AbstractGroupableOverlay$GroupMapItem;->mItemList:Ljava/util/ArrayList;

    invoke-virtual {v5}, Ljava/util/ArrayList;->iterator()Ljava/util/Iterator;

    move-result-object v0

    .local v0, i$:Ljava/util/Iterator;
    :goto_0
    invoke-interface {v0}, Ljava/util/Iterator;->hasNext()Z

    move-result v5

    if-eqz v5, :cond_0

    invoke-interface {v0}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v3

    check-cast v3, Lcom/htc/android/footprints/vo/Footprint;

    .line 326
    .local v3, m:Lcom/htc/android/footprints/vo/Footprint;
    invoke-virtual {v3}, Lcom/htc/android/footprints/vo/Footprint;->getPoint()Lcom/google/android/maps/GeoPoint;

    move-result-object v5

    invoke-virtual {v5}, Lcom/google/android/maps/GeoPoint;->getLatitudeE6()I

    move-result v5

    add-int/2addr v1, v5

    .line 327
    invoke-virtual {v3}, Lcom/htc/android/footprints/vo/Footprint;->getPoint()Lcom/google/android/maps/GeoPoint;

    move-result-object v5

    invoke-virtual {v5}, Lcom/google/android/maps/GeoPoint;->getLongitudeE6()I

    move-result v5

    add-int/2addr v2, v5

    goto :goto_0

    .line 330
    .end local v3           #m:Lcom/htc/android/footprints/vo/Footprint;
    :cond_0
    iget-object v5, p0, Lcom/htc/android/footprints/overlay/AbstractGroupableOverlay$GroupMapItem;->mItemList:Ljava/util/ArrayList;

    invoke-virtual {v5}, Ljava/util/ArrayList;->size()I

    move-result v4

    .line 331
    .local v4, size:I
    new-instance v5, Lcom/google/android/maps/GeoPoint;

    div-int v6, v1, v4

    div-int v7, v2, v4

    invoke-direct {v5, v6, v7}, Lcom/google/android/maps/GeoPoint;-><init>(II)V

    iput-object v5, p0, Lcom/htc/android/footprints/overlay/AbstractGroupableOverlay$GroupMapItem;->mPoint:Lcom/google/android/maps/GeoPoint;

    .line 334
    return-void
.end method

.method public clear()V
    .locals 2

    .prologue
    const/4 v1, 0x0

    .line 337
    iput-object v1, p0, Lcom/htc/android/footprints/overlay/AbstractGroupableOverlay$GroupMapItem;->mPoint:Lcom/google/android/maps/GeoPoint;

    .line 338
    iget-object v0, p0, Lcom/htc/android/footprints/overlay/AbstractGroupableOverlay$GroupMapItem;->mItemList:Ljava/util/ArrayList;

    invoke-virtual {v0}, Ljava/util/ArrayList;->clear()V

    .line 339
    iput-object v1, p0, Lcom/htc/android/footprints/overlay/AbstractGroupableOverlay$GroupMapItem;->mMarker:Landroid/graphics/drawable/Drawable;

    .line 340
    return-void
.end method

.method public getFootprints()Ljava/util/ArrayList;
    .locals 3
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "()",
            "Ljava/util/ArrayList",
            "<",
            "Lcom/htc/android/footprints/vo/Footprint;",
            ">;"
        }
    .end annotation

    .prologue
    .line 356
    new-instance v1, Ljava/util/ArrayList;

    iget-object v2, p0, Lcom/htc/android/footprints/overlay/AbstractGroupableOverlay$GroupMapItem;->mItemList:Ljava/util/ArrayList;

    invoke-virtual {v2}, Ljava/util/ArrayList;->size()I

    move-result v2

    invoke-direct {v1, v2}, Ljava/util/ArrayList;-><init>(I)V

    .line 358
    .local v1, result:Ljava/util/ArrayList;,"Ljava/util/ArrayList<Lcom/htc/android/footprints/vo/Footprint;>;"
    const/4 v0, 0x0

    .local v0, i:I
    :goto_0
    iget-object v2, p0, Lcom/htc/android/footprints/overlay/AbstractGroupableOverlay$GroupMapItem;->mItemList:Ljava/util/ArrayList;

    invoke-virtual {v2}, Ljava/util/ArrayList;->size()I

    move-result v2

    if-ge v0, v2, :cond_0

    .line 359
    iget-object v2, p0, Lcom/htc/android/footprints/overlay/AbstractGroupableOverlay$GroupMapItem;->mItemList:Ljava/util/ArrayList;

    invoke-virtual {v2, v0}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;

    move-result-object v2

    invoke-virtual {v1, v2}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z

    .line 358
    add-int/lit8 v0, v0, 0x1

    goto :goto_0

    .line 361
    :cond_0
    return-object v1
.end method

.method public getMarker()Landroid/graphics/drawable/Drawable;
    .locals 1

    .prologue
    .line 352
    iget-object v0, p0, Lcom/htc/android/footprints/overlay/AbstractGroupableOverlay$GroupMapItem;->mMarker:Landroid/graphics/drawable/Drawable;

    return-object v0
.end method

.method public getPoint()Lcom/google/android/maps/GeoPoint;
    .locals 1

    .prologue
    .line 343
    iget-object v0, p0, Lcom/htc/android/footprints/overlay/AbstractGroupableOverlay$GroupMapItem;->mPoint:Lcom/google/android/maps/GeoPoint;

    return-object v0
.end method

.method public isGroup()Z
    .locals 2

    .prologue
    const/4 v1, 0x1

    .line 365
    iget-object v0, p0, Lcom/htc/android/footprints/overlay/AbstractGroupableOverlay$GroupMapItem;->mItemList:Ljava/util/ArrayList;

    invoke-virtual {v0}, Ljava/util/ArrayList;->size()I

    move-result v0

    if-le v0, v1, :cond_0

    move v0, v1

    :goto_0
    return v0

    :cond_0
    const/4 v0, 0x0

    goto :goto_0
.end method

.method public setMarker(Landroid/graphics/drawable/Drawable;)V
    .locals 0
    .parameter "marker"

    .prologue
    .line 347
    iput-object p1, p0, Lcom/htc/android/footprints/overlay/AbstractGroupableOverlay$GroupMapItem;->mMarker:Landroid/graphics/drawable/Drawable;

    .line 348
    return-void
.end method
